<?php
/**
 * Nad�b (Mak�-Nad�b)
 *
 * @filesource 
 * @copyright  Copyright 2010 mateusweb.com.br
 * @license    Freeware
 * @package    Nadeb_Controller
 * @subpackage Nadeb.Controller
 * @version    1.0
 */

class Nadeb_Controller_Controllers
{
	public static function save($params,$type = "basic")
	{
		$controller  = '';
		$controller .= 'class Admin_' . $params['name_class'] . 'Controller extends Nadeb_Controller_Crud' . "\n";
		$controller .= '{' . "\n";
		
		$controller .= call_user_func( array( "Nadeb_Controller_Controllers", $type ), $params );
		
		$controller .= '}' . "\n";

		Nadeb_Savefile::save($_SERVER['DOCUMENT_ROOT'] . '/application/modules/Admin/Controllers/' . $params['name_class'] . 'Controller.php', '<?php' . "\n" . $controller);
	}
	
	public static function basic($params)
	{
		$controller  = '';
		
		return $controller;
	}
}